export function richReplace(text) {
  const newsCon = text.replaceAll(/<p([\s\w"=\/\.:;]+)((?:(style="[^"]+")))/ig, '<p')
    .replaceAll(/<p>/ig, '<p style="font-size: 15Px; line-height: 25Px;">')
    .replaceAll(/<img([\s\w"-=\/\.:;]+)((?:(height="[^"]+")))/ig, '<img$1')
    .replaceAll(/<img([\s\w"-=\/\.:;]+)((?:(width="[^"]+")))/ig, '<img$1')
    .replaceAll(/<img([\s\w"-=\/\.:;]+)((?:(style="[^"]+")))/ig, '<img$1')
    .replaceAll(/<img([\s\w"-=\/\.:;]+)((?:(alt="[^"]+")))/ig, '<img$1')
    .replaceAll(/<img([\s\w"-=\/\.:;]+)/ig, '<img$1 style="width: 100%;"')
    .replaceAll(/src="/ig, 'src="' + process.env.VUE_APP_BASE_API)
  return newsCon
}
